1. Field of the Invention
The present invention relates to a test-specific circuit provided for detecting failures of a semiconductor integrated circuit, and a method of testing a semiconductor integrated circuit.
2. Description of the Related Art
An internal scanning method is known as one method of “design-for-testability” of a semiconductor integrated circuit. According to the internal scanning method, a sequential circuit provided in a semiconductor integrated circuit is expanded into combinational circuits and memory elements such as flip-flops, and signals are directly controlled and monitored by using external terminals. A test-specific path which penetrates through all sequential circuits (including memory elements) in a logic circuit of the semiconductor integrated circuit is provided, and the sequential circuits operate as a single shift register as a whole. It is possible to directly monitor internal signals by controlling the shift register. Such the single shift register is referred to as a “scan chain”.
By using the scan chain, it is possible to control input-output terminals (ports) of the combinational circuits from the external terminals (pins/ports) of the semiconductor integrated circuit. As a result, a logic value of any of the memory elements can be set to “1” or “0”. A sequence of the logic values set in the memory elements is referred to as a “pattern (test pattern)”. When a test pattern is set in the memory elements and outputs of the memory elements are supplied as test input data to the combinational circuits, the test pattern is referred to as an “input pattern”. On the other hand, when outputs of the combinational circuits are taken in the memory elements and a test pattern stored in the memory elements is output as test result data, the test pattern is referred to as an “output pattern”. Since the logic pattern of any combinational circuit is known, it is possible to compute (estimate) an output pattern corresponding to an input pattern. Thus, an input pattern capable of detecting all failures which may occur in the combinational circuits can be automatically produced through a computer simulation.
In the meanwhile, a semiconductor integrated circuit with large scale integration and multiple functions is developing, and hence shared usage of a functional circuit (functional block) is activated. Such a circuit functional block that can be utilized in common and plays a role of foundation on a semiconductor chip is referred to as a “macro circuit” or an “IP (Intellectual Property) core”.
Input/output terminals (ports) of the combinational circuits included in a semiconductor integrated circuit can be classified into the following three types:
Type-1: An input terminal of a combinational circuit which is connected to an output of a memory element.
Type-2: An output terminal of a combinational circuit which is connected to an input of a memory element.
Type-3: An input terminal or an output terminal of a combinational circuit which is not connected to a memory element but to another combinational circuit or external input/output terminals of the semiconductor integrated circuit.
In a case of a combinational circuit whose all input terminals are of the Type-1 and all output terminals are of the Type-2, the input pattern can be set in the memory elements connected to the all input terminals and the output pattern can be taken in the memory elements connected to the all output terminals. It is thus possible to detect all failures of the combinational circuit. However, in a case of a combinational circuit having an input terminal of the Type-3 or an output terminal of the Type-3, the input pattern can not be set appropriately or the output pattern can not be obtained. It is therefore impossible to detect a part of or all of failures which may occur in the combinational circuit.
With reference to FIG. 1, a case in which input/output terminals of the Type-1 to Type-3 are mixed will be described. FIG. 1 is a schematic view showing a configuration of a semiconductor integrated circuit 100. The semiconductor integrated circuit 100 has a macro circuit 123, combinational circuits 121, 125 and 127, and flip-flops 131, 132, 133, 134, 135 and 136. Signals (data) are input to the semiconductor integrated circuit 100 through external input terminals 111 and 112, and signals (data) are output from the semiconductor integrated circuit 100 through external output terminals 117, 118 and 119. Further, the semiconductor integrated circuit 100 is provided with a test-specific input terminal 114 and a test-specific output terminal 115.
External input data are input to the combinational circuit 121 through respective of the external input terminal 111 and the external input terminal 112. An output data of the combinational circuit 121 is input to the flip-flop 131 and held by the flip-flop 131. An output data of the flip-flop 131 is input to the macro circuit 123. Output data of the macro circuit 123 are input to respective of the flip-flops 132 to 134 and held by the flip-flops 132 to 134. Output data of respective of the flip-flops 132 to 134 are input to the combinational circuit 125. Output data of the combinational circuit 125 are input to respective of the flip-flops 135 and 136 and held by the flip-flops 135 and 136. Output data of respective of the flip-flops 135 and 136 are input to the combinational circuit 127. Output data of the combinational circuit 127 are output as external output data through respective of the output terminals 117 to 119 to the outside of the semiconductor integrated circuit 100.
The above-mentioned configuration (connection) is that in a “normal mode” in which the semiconductor integrated circuit 100 is set to operate normally. In addition to that, the semiconductor integrated circuit 100 can be set to a “test mode”. In the test mode, the above-mentioned flip-flops 131 to 136 are connected serially one after another to form a shift register, which is a test circuit. In the test mode, an input test pattern is input to the semiconductor integrated circuit 100 through the test-specific input terminal (serial input terminal) 114. The input test pattern is shifted in the flip-flops 131 to 136 in order, and the input test pattern is set in respective of the flip-flops 131 to 136. Also, test result data held by respective of the flip-flops 131 to 136 are output as an output test pattern from the semiconductor integrated circuit 100 through the test-specific output terminal (serial output terminal) 115.
The input terminals of the combinational circuit 121 are classified as the Type-3 and the output terminal thereof is classified as the Type-2. The input terminals of the combinational circuit 125 are classified as the Type-1, and the output terminals thereof are classified as the Type-2. The input terminals of the combinational circuit 127 are classified as the Type-1, and the output terminals thereof are classified as the Type-3. In this case, failures as to the combinational circuits 121 and 127 can not be detected, although all failures of the combinational circuit 125 are detected. Therefore, an external test apparatus (not shown) is provided and connected to the external input terminals 111 and 112, and an input pattern is supplied to the combinational circuit 121 at the time when the semiconductor integrated circuit 100 is tested. Also, an external test apparatus (not shown) is provided and connected to the external output terminals 117 to 119 so that output data of the combinational circuit 127 can be derived from the semiconductor integrated circuit 100. As explained above, all failures which may occur in the combinational circuits 121 and 127 can be detected by connecting the external input/output terminals of the semiconductor integrated circuit 100 with the external test apparatus.
When the macro circuit 123 is constituted only by combinational circuits, the test of the semiconductor integrated circuit 100 is performed as follows. First, the semiconductor integrated circuit 100 is set to the test mode, and the flip-flops 131 to 136 are connected in series one after another. An input test pattern is input through the serial input terminal 114 and hence the input test pattern is set in respective of the flip-flops 131 to 136. The test pattern held by the flip-flops 131 to 136 is supplied to the macro circuit (combinational circuit) 123, the combinational circuits 125 and 127. Also, an input test pattern is input to the combinational circuit 121 from the external test apparatus through the external input terminals 111 and 112. Then, each of the combinational circuits 121, 123, 125 and 127 outputs an operation result data indicative of a result of logic operation.
Next, the connection with regard to the flip-flops 131 to 136 is switched from the above-mentioned serial connection to the normal connection. Then, the operation result data output from the combinational circuit 121 is held by the flip-flop 131. The operation result data output from the combinational circuit 123 are held by the flip-flops 132 to 134. The operation result data output from the combinational circuit 125 are held by the flip-flop 135 and the flip-flop 136. Also, the operation result data output from the combinational circuit 127 are stored in a memory in the external test apparatus which is connected to the external output terminals 117 to 119.
Next, the connection with regard to the flip-flops 131 to 136 is switched to the above-mentioned serial connection again. Then, the operation result data held by the flip-flops 131 to 136 are sequentially output from the serial output terminal 115. The operation result data obtained in the test mode (the operation result data output from the serial output terminal 115 or stored in the external test apparatus) are compared with predetermined expected values. In this manner, the normality of the semiconductor integrated circuit 100 is checked. In the case when the macro circuit 123 is a combinational circuit, the failures can be detected with respect to all of the circuits in accordance with the above-described testing method.
Next, let us consider a case when the macro circuit 123 is constituted by sequential circuits. In this case, the output of the macro circuit 123 depends upon input history. Therefore, if an internal configuration of the macro circuit 123 is not disclosed, an output test pattern cannot be calculated only by an input test pattern. Thus, the internal circuits of the semiconductor integrated circuit 100 except for the macro circuit 123 is tested, which deteriorates failure detection rate (failure diagnosis rate).
In order to avoid the problem, the macro circuit 123 is expanded into combinational circuits if the internal configuration of the macro circuit 123 is disclosed. That is, circuits in the macro circuit 123 are separated into combinational circuits and flip-flops. The flip-flops are newly connected to the above-mentioned scan chain outside the macro circuit 123, and thus a new scan chain is constructed. By the use of the new scan chain, the semiconductor integrated circuit 100 can be tested in a similar manner to the above. In this case, a test pattern used for testing the macro circuit 123 must be prepared for every circuit. In particular, when the macro circuit 123 is a large scale one, burdens are increased. Moreover, according to the above method, a pattern design is performed after the scan chain is wired in the chip design. At this time, the circuit configuration of the macro circuit or the chip must be disclosed to a pattern designer. Therefore, the above-mentioned method can not be adopted if the circuit configuration of the macro circuit cannot be opened to the pattern designer.
When an internal configuration of a macro circuit is not opened, the macro circuit and the other circuits may be tested independently by separating the macro circuit from the other circuits. In this case, a terminal of the Type-3 appears in a boundary between the macro circuit and the other circuits. That is, a terminal to which an input test pattern can not be input or a terminal from which an output test pattern can not be derived appears in the boundary between the macro circuit and the other circuits. In the case when the circuit 100 shown in FIG. 1 is a semiconductor chip as in the above explanation, it is possible to supply the input test pattern and derive the output test pattern by connecting the external test apparatus with the external input and output terminals. However, in a case when the circuit 100 shown in FIG. 1 is assumed to be a macro circuit inside the semiconductor chip, the external test apparatus cannot be connected to input/output terminals of the macro circuit. That is, in the case when the macro circuit 100 and the peripheral circuit are tested independently, it is not possible to provide a device which is directly connected to the macro terminals 111, 112, 117, 118 and 119 of the macro circuit 100 for inputting the input test pattern and deriving the output test pattern. In this case, an input test pattern can not be set in the combinational circuit 121 provided between the macro terminals 111, 112 and the flip-flop 131. Moreover, an operation result data can not be derived from the combinational circuit 127 provided between the macro terminals 117 to 119 and the flip-flops 135 and 136. As a result, the failure detection rate is reduced.
FIG. 2 shows another example, which is for preventing the reduction of the failure detection rate. In FIG. 2, additional flip-flops are provided for respective of the macro terminals, and the additional flip-flops are incorporated into the above-mentioned scan chain. For example, a flip-flop 151 and a selecting circuit 161 are provided for the macro terminal 111. The selecting circuit 161 selects data from the macro terminal 111 in the normal mode, while selects the input test pattern set in the flip-flop 151 in the test mode. The selecting circuit 161 outputs the selected data to the combinational circuit 121. Similarly, a flip-flop 152 and a selecting circuit 162 are provided for the macro terminal 112. A flip-flop 153 is provided for the macro terminal 117 on the output side. An operation result data output from the combinational circuit 127 to the macro terminal 117 is held by the flip-flop 153. Similarly, a flip-flop 154 is provided for the macro terminal 118, and a flip-flop 155 is provided for the macro terminal 119. These flip-flops 154 and 155 hold operation result data, respectively. The flip-flops 151 to 155 are connected to the above-mentioned scan chain which is constituted by the flip-flops 131 to 136. As a result, a new scan chain is constructed which is constituted by the flip-flops 131 to 136 and 151 to 155. By using the new scan chain, it becomes possible to detect failures which may occur in the combinational circuits 121 and 127. However, a total number of the flip-flops are increased by the number of the macro terminals of the macro circuit 100, which enlarges an area occupied by the macro circuit. In particular, a macro circuit mounted on an LSI in recent years is equipped with multiple functions and hence a large number of macro terminals. Accordingly, if flip-flops are easily located, a wiring congestion degree is increased and a chip area is increased.
For example, in a case of a macro circuit having about 3000 flip-flops inside, the total number of the macro terminals is nearly 300. In this case, it is necessary to add another 300 flip-flops whose number is equal to the number of the macro terminals. That is to say, the number of flip-flops is increased by 10% in order to improve the failure detection rate, which has an adverse affect on the chip area.
A test technique is disclosed in Japanese Laid-Open Patent Application (JP-P2001-208810A), in which the test is performed for a circuit group including not only a macro circuit but also a part of combinational circuits outside the macro circuit, instead of separating the macro circuit from the other circuits. According to the conventional technique, a scan pattern used for testing the macro circuit is prepared with respect to the circuit group including the macro circuit and the combinational circuits outside the macro circuit. The prepared scan pattern is set in a scan flip-flop on the input side by using a scan-in terminal. An output data of the scan flip-flop is input to the macro circuit through a combinational circuit on the input side out of the combinational circuits outside the macro circuit. An operation result data of the macro circuit is taken in a scan flip-flop on the output side through a combinational circuit on the output side out of the combinational circuits outside the macro circuit. An output data of the scan flip-flop on the output side is output from a scan output terminal as a comparison data which is compared with a predetermined expected value. In this case, it is necessary to prepare a scan pattern used for testing the macro circuit every time the circuit outside the macro circuit is changed, although the macro circuit itself does not change.